package com.framework.admin.repository;

import com.framework.admin.model.ModuleForm;
import com.framework.common.repository.BaseJpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;


/**
 * @description: 模块表单管理 Repository
 * @author: lizurong
 * @version: 1.0
 * @date: 2021-03-08 13:07:55
 */

@Repository
public interface ModuleFormRepository extends BaseJpaRepository<ModuleForm, String> {

    @Transactional
    @Modifying
    @Query("update ModuleForm t set t.formJson=:formJson where t.id=:moduleFormId")
    void updateFormJson(@Param("formJson") String formJson, @Param("moduleFormId") String moduleFormId);

}
